package com.colin.response;

public enum RCM {

    SUCCESS(0, "成功"),
    ERROR(1, "常规错误"),

    USER_EXISTS(1002, "用户已存在"),
    USER_REGISTER_ERROR(1003, "用户注册错误"),

    USER_NOT_ADMIN(1005, "用户不是管理员"),
    USER_NOT_AUTHORIZED(1006, "用户无权限"),
    USER_NOT_FOUND(1007, "用户未找到"),

    USER_NOT_LOGIN(1004, "用户未登录"),

    USER_NOT_EXISTS(1001, "用户不存在"),
    USER_PASSWORD_ERROR(1008, "用户密码错误"),
    // RCM.USER_LOGIN_ERROR.getCode()   RCM.USER_LOGIN_ERROR.getMessage()
    USER_LOGIN_ERROR(1009, "用户登录错误"),


    SQL_ERROR(5000, "数据库操作错误");



    private final Integer code;
    private final String message;

    RCM(int i, String message) {
        this.code = i;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
